package com.nai365.nart.member.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("ums_user_money_log")
@ApiModel(value = "用户交易流水")
public class UserMoneyLog extends Model<UserMoneyLog> {

	@TableId(type = IdType.ASSIGN_ID)
	private Long id;//` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',

	private Long userId;//` int(11) NOT NULL DEFAULT 0 COMMENT '用户',

	private BigDecimal money;//` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更余额',

	private int type;//` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '变更类型:1=增加,2=减少',

	private String memo;//` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',

	private BigDecimal after;//` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更后余额',

	private int source;//` tinyint(1) NOT NULL DEFAULT 1 COMMENT '来源:1=收入,2=支出,3=充值,4=提现,5=回收,6=系统变动',

	private Date createtime;//` int(11) NOT NULL DEFAULT 0 COMMENT '变更时间',

	private String admin;//` tinyint(1) NOT NULL DEFAULT 0,

	private String outSn;//` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '银行流水号',
}
